var t = getApp();

Component({
    properties: {
        stores: {
            type: null
        },
        loading: {
            type: null
        },
        page: {
            type: null
        },
        totalPage: {
            type: null
        },
        text: {
            type: null
        },
        cityData: {
            type: null
        },
        pointData: {
            type: null
        },
        classifytype: {
            type: null
        },
        is_open: {
            type: null
        },
        isMoreShow: {
            type: null
        }
    },
    data: {
        language: "",
        list: [],
        show: !1,
        skipshow: !1
    },
    lifetimes: {
        attached: function() {
            var t = wx.getStorageSync("langIndex");
            this.setData({
                language: t.en
            }), this.data.page >= this.data.totalPage ? this.setData({
                show: !1
            }) : this.setData({
                show: !0
            });
        },
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        this.data.classifytype && 1 == this.data.classifytype && this.setData({
            skipshow: !0
        });
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        toGood: function(t) {
            var a = t.currentTarget.dataset.goods_id;
            wx.navigateTo({
                url: "/packageA/detail_v2/detail_v2?id=" + a
            });
        },
        goToAdress: function(a) {
            var e = a.currentTarget.dataset.items.latitude, o = a.currentTarget.dataset.items.longitude, i = a.currentTarget.dataset.items.store_name, s = t.BMapTransqqMap(parseFloat(o), parseFloat(e));
            wx.openLocation({
                latitude: s.lat,
                longitude: s.lng,
                scale: 18,
                name: i
            });
        },
        toRouter: function(t) {
            var a = t.currentTarget.dataset.items.specify_show, e = t.currentTarget.dataset.items.id;
            1 == a ? wx.navigateTo({
                url: "/packageC/o2o/o2oStore/o2oStore?store_id=" + e
            }) : wx.navigateTo({
                url: "/packageC/o2o/HomeSeller/HomeSeller?store_id=" + e
            });
        },
        toClassify: function(t) {
            var a = t.currentTarget.dataset.id, e = t.currentTarget.dataset.name;
            this.data.skipshow ? wx.redirectTo({
                url: "/packageC/o2o/o2oCategory/o2oCategory?id=" + a + "&city=" + this.data.cityData + "&point=" + JSON.stringify(this.data.pointData) + "&name=" + e
            }) : wx.navigateTo({
                url: "/packageC/o2o/o2oCategory/o2oCategory?id=" + a + "&city=" + this.data.cityData + "&point=" + JSON.stringify(this.data.pointData) + "&name=" + e
            });
        },
        gophone: function(t) {
            var a = t.currentTarget.dataset.mobile;
            wx.makePhoneCall({
                phoneNumber: a
            });
        },
        getMoreStores: function() {
            this.triggerEvent("changList");
        }
    },
    observers: {
        totalPage: function() {
            this.data.page >= this.data.totalPage ? this.setData({
                show: !1
            }) : this.setData({
                show: !0
            });
        },
        page: function() {
            this.data.page >= this.data.totalPage ? this.setData({
                show: !1
            }) : this.setData({
                show: !0
            });
        }
    }
});